package delegate

class Site(val map: Map<String, Any?>) {
    val name: String by map
    val url: String by map
}

fun main() {
    val site = Site(mapOf(
        "name" to "菜鸟教程",
        "url" to "www.runoob.com"
    ))
    println(site.name)
    println(site.url)
}